From 5769234f691a05c8d750e8ffc592fd6402e476e4 Mon Sep 17 00:00:00 2001
From: Myy <myy@miouyouyou.fr>
Date: Sun, 30 Jul 2017 17:43:34 +0000
Subject: [PATCH 4/9] FIXME Remove DRM security for testing purposes

For *TESTING* purposes ONLY !

!! This shunts all the security features put in the DRM drivers !!

This patch comes from @wzyy2 and seems to solve issues with X11 and
EGLFS.

That said... Once the VPU driver working, this should be fixed ASAP !

Signed-off-by: Myy <myy@miouyouyou.fr>
---
 drivers/gpu/drm/drm_ioctl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c
index f1eb3265..dc849233 100644
--- a/drivers/gpu/drm/drm_ioctl.c
+++ b/drivers/gpu/drm/drm_ioctl.c
@@ -499,6 +499,7 @@ int drm_version(struct drm_device *dev, void *data,
  */
 int drm_ioctl_permit(u32 flags, struct drm_file *file_priv)
 {
+#if 0
 	/* ROOT_ONLY is only for CAP_SYS_ADMIN */
 	if (unlikely((flags & DRM_ROOT_ONLY) && !capable(CAP_SYS_ADMIN)))
 		return -EACCES;
@@ -523,6 +524,7 @@ int drm_ioctl_permit(u32 flags, struct drm_file *file_priv)
 	if (unlikely(!(flags & DRM_RENDER_ALLOW) &&
 		     drm_is_render_client(file_priv)))
 		return -EACCES;
+#endif
 
 	return 0;
 }
-- 
2.13.0

